<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${trainingResources.id}" type="hidden">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">课程：</label>
                            <div class="col-sm-8">
                                <input id="coursesId1" th:value="${trainingResources.coursesId}"
                                       class="form-control" type="hidden">
                                <select name="coursesId" id="coursesId" class="form-control"></select>
                            </div>
                        </div>
                        <div class="form-group" id="chapter" style="display: none">
                            <label class="col-sm-3 control-label">章节：</label>
                            <div class="col-sm-8">
                                <input id="chapterId1" th:value="${trainingResources.chapterId}"
                                       class="form-control" type="hidden">
                                <select name="chapterId" id="chapterId" class="form-control"></select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">资源名：</label>
                            <div class="col-sm-8">
                                <input id="name" name="name" th:value="${trainingResources.name}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">资源类型：</label>
                            <div class="col-sm-8">
                                <input id="type1"  th:value="${trainingResources.type}" class="form-control"
                                       type="hidden">
                                <select name="type" id="type" class="form-control">
                                    <option value="">选择类型</option>
                                    <option value="0">文档</option>
                                    <option value="1">视频（支持mp4、webm、ogg格式）</option>
                                    <option value="2">课件（ppt）</option>
                                    <option value="3">动画</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" style="display: none" id="resourse">
                            <label class="col-sm-3 control-label">资源路径(视频仅支持mp4、webm、ogg格式)：</label>
                            <div class="col-sm-8">
                                <button type="button" class="btn btn-success inp_1" style="margin-top: 20px;display: none" id="btnUpload">
                                    <i class="fa fa-cloud"></i>重新资源文件
                                </button>
                                <button type="button" class="btn btn-success inp_1"
                                        style="margin-top: 20px;display: none" id="btnUpload1">
                                    <i class="fa fa-cloud"></i>重新资源文件
                                </button>
                                <input type="text" style="opacity:0;width: 1px;"  id="enclosure" th:value="${trainingResources.fileRoute}"
                                       name="fileRoute"/>
                                <span id="test" th:text="${trainingResources.fileRoute}" style="display:block"></span>
                            </div>
                        </div>
                        <div class="form-group" id="videoDurationDiv" style="display: none">
                            <label class="col-sm-3 control-label">视频时长：</label>
                            <div class="col-sm-8">
                                <input id="videoDuration" name="videoDuration" readonly th:value="${trainingResources.videoDuration}" class="form-control"
                                       type="text">
                                <video id="videoattr" style="display: none" width="20" height="10"></video>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="//s.xlongwei.com/res/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/webJs/jzweb/trainingResources/edit.js">
</script>
</body>
</html>
